import { test } from '@playwright/test';

test('中文导航栏', async ({ page }) => {
  await page.goto('/zh');
  await page.getByRole('link', { name: '软件包' }).click();
  await page.getByRole('link', { name: '支持工具' }).click();
  const page1Promise = page.waitForEvent('popup');
  await page.getByRole('link', { name: '文档' }).click();
  const page1 = await page1Promise;
  await page.getByRole('link', { name: '知识图谱' }).click();
  await page.getByRole('link', { name: '学习进阶' }).click();
  await page.getByRole('link', { name: 'FAQ' }).click();
  await page.getByRole('link', { name: '社区贡献', exact: true }).click();
  await page.getByRole('link', { name: '线上交流' }).click();
  await page.getByRole('link', { name: '社区组织' }).click();
  await page.getByRole('link', { name: '用户实践' }).click();
  await page.getByRole('link', { name: '金融专区' }).click();
  await page.getByRole('link', { name: 'Call for Meetup' }).click();
  await page.getByRole('link', { name: '结队计划' }).click();
  await page.getByRole('link', { name: '迁移专区' }).click();
  await page.getByRole('link', { name: '社区荣誉' }).click();
  const page2Promise = page.waitForEvent('popup');
  await page.getByRole('link', { name: '贡献看板' }).click();
  const page2 = await page2Promise;
  await page.getByRole('link', { name: '新闻' }).click();
  await page.getByRole('link', { name: '博客' }).click();
  await page.getByRole('link', { name: '活动' }).click();
  await page.getByRole('link', { name: '视频' }).click();
  await page.getByRole('link', { name: '大咖之声' }).click();
  await page.getByRole('link', { name: '峰会' }).click();
  await page.getByRole('link', { name: '发行版认证' }).click();
  await page.getByRole('link', { name: '兼容性列表' }).click();
  await page.getByRole('link', { name: '服务商认证' }).click();
  await page.getByRole('link', { name: '培训认证' }).click();
  await page.getByRole('link', { name: '漏洞管理' }).click();
  await page.getByRole('link', { name: '安全公告' }).click();
  await page.getByRole('link', { name: 'CVE' }).click();
  const page3Promise = page.waitForEvent('popup');
  await page.getByRole('link', { name: 'Gitee' }).click();
  const page3 = await page3Promise;
  const page4Promise = page.waitForEvent('popup');
  await page.getByRole('link', { name: 'Github' }).click();
  const page4 = await page4Promise;
});